﻿using System.Linq.PageList;
using Dyao.Book.Contract;

namespace Dyao.Book.Application.Abstractions
{
    /// <summary>
    /// 任务中心配置
    /// </summary>
    public interface ITaskCenterSettingsApplication
    {
        /// <summary>
        /// 分页获取任务中心配置信息
        /// </summary>
        /// <param name="pageFilter">分页筛选器</param>
        /// <param name="cancellationToken">取消操作的通知</param>
        /// <returns>返回任务中心配置</returns>
        Task<IPageList<TaskCenterSettingsDto>> GetPageListAsync(IPageFilter<TaskCenterSettingFilterDto> pageFilter, CancellationToken cancellationToken = default);

        /// <summary>
        /// 新增任务中心配置信息
        /// </summary>
        /// <param name="settingModel">配置信息</param>
        /// <param name="cancellationToken">取消操作的通知</param>
        /// <returns></returns>
        Task CreateTaskCenterSettingAsync(TaskCenterSettingsDto settingModel, CancellationToken cancellationToken = default);

        /// <summary>
        /// 修改任务中心配置信息
        /// </summary>
        /// <param name="settingModel">配置信息</param>
        /// <param name="cancellationToken">取消操作的通知</param>
        /// <returns></returns>
        Task ModifiedTaskCenterSettingAsync(TaskCenterSettingsDto settingModel, CancellationToken cancellationToken = default);

        /// <summary>
        /// 获取任务中心配置信息
        /// </summary>
        /// <param name="settingId">配置信息ID</param>
        /// <param name="cancellationToken">取消操作的通知</param>
        /// <returns>返回配置信息</returns>
        Task<TaskCenterSettingsDto> GetTaskCenterSettingAsync(string settingId, CancellationToken cancellationToken = default);

        /// <summary>
        /// 删除任务配置中心配置信息
        /// </summary>
        /// <param name="settingIds">配置主键集合</param>
        /// <param name="cancellationToken">取消操作的通知</param>
        /// <returns></returns>
        Task DeleteTaskCenterSettingAsync(List<string> settingIds, CancellationToken cancellationToken);

        /// <summary>
        /// 获取尚未配置的TaskCode信息
        /// </summary>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<List<TaskCenterCodeDto>> GetUnSettingTaskCodesAsync(CancellationToken cancellationToken = default);
    }
}
